public class CLongFloat {
	public static void main( String[] args ) {	
		long Quantity = 100000000;
		
		long MS = System.currentTimeMillis();
		long A = fromFloat( 6.1f );
		long B = fromFloat( 1.1f );
		long C = 0;
		for( int N = 0; N < Quantity; N++ ) C += divide( A, B );
		System.out.println( System.currentTimeMillis() - MS );
		
		float D = 6.1f;
		float E = 6.1f;
		float F = 0;
		MS = System.currentTimeMillis();
		for( int N = 0; N < Quantity; N++ ) F += D / E;
		System.out.println( System.currentTimeMillis() - MS );
	}
	
	public static long fromInt( int Value ) {
		return ( (long) Value ) << 32;
	}
	
	public static long fromLong( long Value ) {
		return Value << 32;
	}
	
	public static long fromFloat( float Value ) {
		return (long) ( Value * 4294967296f );
	}
	
	public static long multiply( long Value1, long Value2 ) {
		long sign = Value1 & 0x8000000000000000l;
		if( sign != 0l ) Value1 = -Value1;
						
		long A = Value1 >>> 32;
		long B = Value1 & 0xFFFFFFFFl;
		
		long sign2 = Value2 & 0x8000000000000000l;
		if( sign2 != 0l ) {
			Value2 = -Value2;
			if( sign != 0l ) sign = 0l; else sign = sign2;
		}
						
		long C = Value2 >>> 32;
		long D = Value2 & 0xFFFFFFFFl;
		long Value = ( ( A * C ) << 32 ) + B * C + A * D + ( ( B * D ) >>> 32 );
		if( sign == 0l ) return Value; else return -Value;
	}
	
	public static long divide( long Value1, long Value2 ) { 
		long sign = Value1 & 0x8000000000000000l;
		if( sign != 0l ) Value1 = -Value1;
		
		long A = Value1 & 0xFFFFFFFF00000000l;
		long B = Value1 & 0xFFFFFFFFl;
		
		long sign2 = Value2 & 0x8000000000000000l;
		if( sign2 != 0l ) {
			Value2 = -Value2;
			if( sign != 0l ) sign = 0l; else sign = sign2;
		}
		
		long C = Value2 & 0xFFFFFFFF00000000l;
		long D = Value2 & 0xFFFFFFFFl;
		
		long Value;
		if( C == 0l ) {
			Value = ( Value1 / D ) << 32;
		} else if( D == 0l ) {
			Value = Value1 / C;
		} else {
			long BCAD = ( B << 31 ) / D - ( A >> 1 ) / C;
			Value = ( ( A << 32 ) / C + ( BCAD / ( ( C >> 1 ) / D + 1 ) ) );
		}
		if( sign == 0l ) return Value; else return -Value;
	}
	
	public static int toInt( long Value ) {
		return (int) ( Value >>> 32 );
	}

	public static float toFloat( long Value ) {
		return Value / 4294967296f;
	}
}
